Skip to content

Let a user choose the advertised tools of every server - #424

Merged
Gabriel-Darbord merged 1 commit into
mainfrom
users-choose-advertised-tools
Nov 23, 2026
Merged

Gabriel-Darbord merged 1 commit into
mainfrom
users-choose-advertised-tools

Conversation

@Gabriel-Darbord

Copy link
Copy Markdown
Member

A server's advertised tools could only be chosen in Smalltalk, one server at a time, so a user had no way to choose them once for every image they run.

A server now reads tools.json from MCP's folder of the user's configuration when it starts: $XDG_CONFIG_HOME/pharo-mcp, %APPDATA%\pharo-mcp on Windows, else ~/.config/pharo-mcp, where otel.env already lives. Its advertise and unadvertise lists move tools across the defaults (MCPToolChoice, held by the tool registry), so a tool a later release adds still follows its default exposure, and a server whose code chose its tools (advertiseTools:, advertiseAllTools, onlyTools:) keeps them.

The file is read leniently: a name no tool in the image has changes nothing, since the tool may come from a project the image does not load; a name in both lists keeps its default; and a file that is missing, unreadable or not an object of name lists changes nothing and never stops a server.

The folder rules move from MCPOpenTelemetrySettings to a new MCPUserSettings, which the telemetry settings now extend, so both files are found the same way.

A server reads tools.json from MCP's folder of the user's configuration when
it starts. Its advertise and unadvertise lists move tools across the
defaults, and a server whose code chose its tools keeps them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Gabriel-Darbord
Gabriel-Darbord merged commit 86cd9e4 into main Nov 23, 2026
6 checks passed
@Gabriel-Darbord
Gabriel-Darbord deleted the users-choose-advertised-tools branch November 23, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant